package conftest

import (
	"fmt"
	"github.com/gogf/gf/net/ghttp"
	"github.com/gogf/gf/os/gcfg"
)

var Conftest = new(conftestApi)

type conftestApi struct {
}

func (p *conftestApi) LoadConf(r *ghttp.Request) {
	cf := gcfg.Instance().SetFileName("conftest.toml_bak")
	str := fmt.Sprintf("onwer name:%s\n", cf.GetString("owner.name"))
	r.Response.Write(str)
	gcfg.Instance().SetFileName("config.toml")
}
